// import { observable, action } from "mobx";
import { observable } from "mobx";
import { createContext, useContext } from "react"
import Header from './header'
import Sale from './sale'
import Customer from './customer'
import Logistics from './logistics'
import Finance from './finance'
import FinanceCosts from './financeCosts'
import TransportCosts from './transportCosts'
import MaterialStore from './materialStore'
import GoodStore from './goodStore'
import ProductStore from './productStore'
import PurchaseGood from './purchaseGood'
import PurchaseMaterial from './purchaseMaterial'

const store={
    header :new Header(),
    sale:new Sale(),
    customer:new Customer(),
    logistics: new Logistics(),
    finance:new Finance(),
    financeCosts:new FinanceCosts(),
    transportCosts:new TransportCosts(),
    materialStore:new MaterialStore(),
    goodStore:new GoodStore(),
    productStore:new ProductStore(),
    purchaseGood:new PurchaseGood(),
    purchaseMaterial:new PurchaseMaterial(),
}

const context = createContext(store)


export  const useStores = () => useContext(context);